package cn.wit.front.controller;

import cn.wit.front.service.ProjectHistoryInfoService;
import cn.wit.utils.pojo.ProjectHistoryInfo;
import cn.wit.utils.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/tech/projectHistoryInfo")
@CrossOrigin
@Api(tags = "项目信息浏览记录")
public class ProjectHistoryInfoController {
    private Logger logger = LoggerFactory.getLogger(ProjectHistoryInfoController.class);
    @Autowired
    private ProjectHistoryInfoService projectHistoryInfoService;

    @PostMapping("/insertProjectHistoryInfo")
    @ApiOperation("项目信息历史记录新增")
    public Result insertProjectHistoryInfo(@RequestBody ProjectHistoryInfo projectHistoryInfo) {
        return this.projectHistoryInfoService.insertProjectHistoryInfo(projectHistoryInfo);
    }

    @PostMapping("/recommandProject")
    @ApiOperation("项目推荐")
    public Result recommandProject(String username) {
        return projectHistoryInfoService.recommandProject(username);
    }

}
